package com.rdtravel.web;

import com.rdtravel.entities.Continent;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/continents")
class ContinentsController {
	private static final String VIEW = "continents/continents";

	@RequestMapping(method = RequestMethod.GET)
	public String findAll() {
		return VIEW;
	}

	@RequestMapping(value = "{continent:\\d+}/destinations", method = RequestMethod.GET)
	public ModelAndView findById(@PathVariable Continent continent) {
		return new ModelAndView(VIEW);
	}

}
